package com.sxj.PDMS.mapper;

import com.sxj.PDMS.model.entity.DataInformationList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @author 503c'j
 * @description 针对表【data_information_list(资料信息列表)】的数据库操作Mapper
 * @createDate 2024-06-12 09:49:38
 * @Entity com.sxj.PDMS.model.entity.DataInformationList
 */
@Mapper
public interface DataInformationListMapper extends BaseMapper<DataInformationList> {
    @Select("select count(*) from data_information_list")
    public Long selectTotal();

    /**
     * 查询所有数据,分页展示
     *
     * @param start
     * @param pageSize
     * @return
     */
    @Select("select * from data_information_list limit #{start},#{pageSize}")
    public List<DataInformationList> selectAll(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    public List<DataInformationList> selectByTypeOrNameOrEvent(@Param("start") Integer start,
                                                               @Param("pageSize") Integer pageSize,
                                                               @Param("time") Date time,
                                                               @Param("type") Integer type,
                                                               @Param("name") String name,
                                                               @Param("event") String event);
    public Long selectTotalByTypeOrNameOrEvent(@Param("time") Date time,
                                               @Param("type") Integer type,
                                               @Param("name") String name,
                                               @Param("event") String event);
    }




